const blog = {
    state: {
        articleList: [],
        searchKey: '',
        currentPage: 1,
        pageSize: 6,
        total: 0,
        loading: false
    },

    mutations: {
        SET_BLOG_LIST(state, data) {
            state.articleList = data
        },
        SET_SEARCH_KEY(state, data) {
            state.searchKey = data
        },
        SET_SEARCH_CURRENTPAGE(state, data) {
            state.currentPage = data
        },
        SET_SEARCH_PAGESIZE(state, data) {
            state.pageSize = data
        },
        SET_BLOG_TOTAL(state, data) {
            state.total = data
        },
        SET_BLOG_LOADING(state, data) {
            state.loading = data
        },
        INIT_BLOG(state) {
            state.articleList = []
            state.searchKey = '',
            state.currentPage = 1,
            state.pageSize = 6,
            state.total = 0,
            state.loading = false
        }
    },
}

export default blog
